package com.example.controller;

import com.example.entity.User;
import com.example.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class UserController {
    @Autowired
    private UserMapper userService;
    @RequestMapping("/abc")
    public Animal getName() {
        return new Animal(12,"cat");
    }

    @RequestMapping("/abcd")
    public List<User> getUser() {
        return userService.findAll();
    }


}
